import Vue from "./vue.js";
const vm = new Vue({
  data() {
    return {
      a: 1,
      b: 2,
      d: 3,
      f: 4,
    };
  },
  computed: {
    totalAB() {
      console.log("computed  computed  totalaaa");
      return this.a + this.b;
    },
    totalDF: {
      get() {
        console.log("computed computed totalCCC");
        return this.d + this.f + this.f;
      },
    },
    ccc() {
      console.log("computed computed ccc", this.totalAB, this.totalDF);
      return this.totalAB + this.totalDF;
    },
  },
  watch: {
    a(newValue, oldValue) {
      this.b = 33;
      console.log("watch a", newValue, oldValue);
    },
    b(newValue, oldValue) {
      console.log("watch b", newValue, oldValue);
    },
    totalAB(newValue, oldValue) {
      console.log("watch totalAB", newValue, oldValue);
    },
  },
});
// console.log(vm);
// console.log(vm.total);
// // vm.a = 100
// console.log(vm.total);
window.vm = vm;

// console.log(vm.totalaaa);
// vm.totalaaa = 22;
